Compile your C source in to an '#?.o' (object) file and write an
external module for it.
Example:
Let's have a small function in C:
int test(int a, int b)
{
int c;
c=a*b+10;
return(c);
}
which we want to call from PowerD. Name this proggy 'test.c'.
First You should compile it with Your favorit C compiler. It will
generate sth like 'test.o' file which will contain our function.
Then we can write external module if we want to use this function
in more PowerD proggies, call it 'dmodules:my/test.m':
OPT LINK='test.o'
LPROC test(a:LONG,b:LONG)(LONG)
don't forget about full path of 'test.o'!. Then everytime You use
MODULE 'my/test' You will be able to use
the function.
If You want to use this function in only one Your program, enter
somewhere in the proggy the same as in the module (above). If everything
went O.K. You are now able to use the function like: